//
//  ProjectInfoViewCell.m
//  F50
//
//  Created by zack on 15/5/29.
//  Copyright (c) 2015年 ZACK. All rights reserved.
//

#import "ProjectInfoViewCell.h"

@implementation ProjectInfoViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.contentView.backgroundColor = RGB(35, 91, 133);
        
        self.chanceLab = [[UILabel alloc]initWithFrame:CGRectMake(20, 5, 200, 20)];
        self.chanceLab.textColor = [UIColor whiteColor];
        self.chanceLab.font = [UIFont systemFontOfSize:18];
        [self.contentView addSubview:self.chanceLab];
        
        UILabel *line = [[UILabel alloc]initWithFrame:CGRectMake(10, 30, WIDTH- 20, 1)];
        line.backgroundColor = RGB(112, 159, 204);
        [self.contentView addSubview:line];
        
        
        self.infoLab = [[UILabel alloc]initWithFrame:CGRectMake(20, 35, WIDTH - 40, 50)];
        self.infoLab.textColor = [UIColor whiteColor];
        self.infoLab.font = [UIFont systemFontOfSize:15];
        self.infoLab.numberOfLines = 0;
        [self.contentView addSubview:self.infoLab];
        

//        
    }
    return self;
}




- (void)setInfoLabelTextFrame:(NSString *)str
{
    CGRect bounds = [str boundingRectWithSize:CGSizeMake(WIDTH - 40, 100000) options:NSStringDrawingUsesLineFragmentOrigin attributes:[NSDictionary dictionaryWithObject:[UIFont systemFontOfSize:15] forKey:NSFontAttributeName] context:nil];
    
    self.infoLab.frame = CGRectMake(20, 35, WIDTH - 40, bounds.size.height);
    
}

+ (CGFloat)heightForCell:(NSString *)str
{
    CGRect bounds = [str boundingRectWithSize:CGSizeMake(WIDTH - 40, 100000) options:NSStringDrawingUsesLineFragmentOrigin attributes:[NSDictionary dictionaryWithObject:[UIFont systemFontOfSize:14] forKey:NSFontAttributeName] context:nil];
    return bounds.size.height + 50;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
